import * as network from '@/utils/request';

import { num } from '../../config/Apis';


export async function getSegmentList(params: any): Promise<any> {
    return network.post(num.segmentList, {
        data: params,
        requestType: 'form'
    });
}

export async function getSegmentDetail(params: any): Promise<any> {
    return network.post(num.segmentDetail, {
        data: params,
        requestType: 'form'
    });
}

export async function segmentCreate(params: any): Promise<any> {
    return network.post(num.segmentCreate, {
        data: params,
        requestType: 'form'
    });
}

export async function segmentUpdate(params: any): Promise<any> {
    return network.post(num.segmentUpdate, {
        data: params,
        requestType: 'form'
    });
}

export async function segmentDelete(params: any): Promise<any> {
    return network.post(num.segmentDelete, {
        data: params,
        requestType: 'form'
    });
}

export async function getBySegment(params: any): Promise<any> {
    return network.post(num.getBySegment, {
        data: params,
        requestType: 'form'
    });
}
